﻿using GKQC.Common;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;

namespace GKQC.Machine
{
    public interface ILcMeter
    {
        string Prefix { get; set; }
        bool Check(SerialPort sp);
        void ControlMachine(SerialPort sp);

        void UnControlMachine(SerialPort sp);

        void SetLeak(SerialPort sp, string leak);
        /// <summary>
        /// 10通道才用到的
        /// </summary>
        /// <param name="sp"></param>
        string GetLeak(SerialPort sp, string add);

        void SetVoltage(SerialPort sp, decimal voltage);

        void SetCharTime(SerialPort sp, decimal chargeTime);

        void SetDisChargeTime(SerialPort sp, decimal disChargeTime);
        void SetTestTime(SerialPort sp, decimal testTime);

        void Char(SerialPort sp);

        void DisCharge(SerialPort sp);

        void Test(SerialPort sp);

        int GetChargeTime(SerialPort sp);

        decimal GetVoltage(SerialPort sp);

        string GetData(SerialPort sp);

        List<double> AnalysisData(string rawData);
    }
}
